﻿Imports System
Imports System.Collections.Generic
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes

Namespace Views


    Partial Public Class V2ViewGraphEditor
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Sub New()
            MyBase.New()

            Me.InitializeComponent()

            ' Insert code required on object creation below this point.
        End Sub

        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Private Sub VariablesInsertion(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
            Dim mi = TryCast(sender, MenuItem)
            If mi Is Nothing Then Return
            Dim dc = mi.DataContext.Caption 'Column.Value.chOutil.Nom
            If dc Is Nothing Then Return
            Dim cm = TryCast(ItemsControl.ItemsControlFromItemContainer(ItemsControl.ItemsControlFromItemContainer(mi)), ContextMenu)
            If cm Is Nothing Then Return
            Dim txt = TryCast(cm.PlacementTarget, TextBox)
            If txt Is Nothing Then Return
            txt.AppendText(dc.ToString())

        End Sub



    End Class
    

End Namespace